package com.lantosec.hmrp.modules.archives.entity;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserBonusPenaltyVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 领导干部奖惩情况登记表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserBonusPenalty extends BaseEntity<UserBonusPenaltyVO> {

    private static final long serialVersionUID = 1L;
    public UserBonusPenalty(UserBonusPenaltyVO vo){
        this.userBonusPenaltyId = vo.getUserBonusPenaltyId();
        this.userId = vo.getUserId();
        this.bonusPenaltyFlag = vo.getBonusPenaltyFlag();
        this.happenDate = vo.getHappenDate();
        this.name = vo.getName();
        this.reason = vo.getReason();
        this.grantOrg = vo.getGrantOrg();
        this.refNo = vo.getRefNo();
        this.remark = vo.getRemark();
        this.createId = vo.getCreateId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.verifyId = vo.getVerifyId();
        this.verifyUser = vo.getVerifyUser();
        this.verifyTime = vo.getVerifyTime();
        this.verifyStatus = vo.getVerifyStatus();
    }

    @Override
    public UserBonusPenaltyVO convertToVO(){
        return new UserBonusPenaltyVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "user_bonus_penalty_id", type = IdType.ASSIGN_UUID)
    private String userBonusPenaltyId;

    /**
     * 用户主表ID
     */
    private String userId;

    /**
     * 奖惩标志（0：奖，1：惩）
     */
    private Integer bonusPenaltyFlag;

    /**
     * 发生时间
     */
    private String happenDate;

    /**
     * 奖惩名称
     */
    private String name;

    /**
     * 奖惩原因
     */
    private String reason;

    /**
     * 奖惩机关
     */
    private String grantOrg;

    /**
     * 文号
     */
    private String refNo;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人ID
     */
    private String createId;

    /**
     * 创建人姓名
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 审核人ID
     */
    private String verifyId;

    /**
     * 审核人姓名
     */
    private String verifyUser;

    /**
     * 审核时间
     */
    private Date verifyTime;

    /**
     * 审核状态（0：未审核，1：以审核）
     */
    private Integer verifyStatus;


    public enum ColName {
        user_bonus_penalty_id, user_id, bonus_penalty_flag, happen_date, name, reason, grant_org, ref_no, remark, create_id, create_user, create_time, verify_id, verify_user, verify_time, verify_status,
    }
}
